home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Libris Britannia 4
/
science library(b).zip
/
science library(b)
/
TECHNICA
/
AUTOCAD
/
H107.ZIP
/
AUTOCM30.ZIP
/
AUTOCMND.DOC
< prev
next >
Wrap
Text File
|
1991-09-03
|
18KB
|
363 lines
Page 1
-----------------------------------------------------------------------
----------------------| AUTOCOMMAND |----------------------------------
-----------------------------------------------------------------------
Eric Michalowsky Voice (213) 829-7535
Cohen and Kanwar, Inc. Fax (213) 829-7950
Consulting Electrical Engineers Modem (213) 829-7151
1753 Cloverfield Boulevard
Santa Monica, CA 90404 C-Serve 72070-3704
-----------------------------------------------------------------------
Welcome to AutoCommand - a lisp routine that may well revolutionize
the way you use AutoCad!!!
----------------------- INTRODUCTION ----------------------------------
The following is a simplified discussion of the AutoCommand routine -
the best way to see its usefulness is to jump right in and use it!!
AutoCommand allows the operator to use what is existing on the screen to
add extra information, edit the information that is there, manipulate
the layers of the drawing, zoom around the drawing and manipulate text
in the drawing - all with one letter commands. As easy as that. About
90% of the commands used 90% of the time can be invoked with this one
command. Theoretically, for about 80% of your work you can run this one
command instead of picking all the different ones from either the
digitizer, screen menu or pull-downs. You can also add this command to
your pull-downs so that it will work continuously until you decide
otherwise and Ctrl-C the command.
The basic premise to AutoCommand is, by moving the crosshairs around the
screen, to recognize entities on the screen and then either Edit these
recognized entities, begin a new Draw command based on the entity
recognized by the command or manipulate layers and entities based on the
layer of the entity recognized. This may at this stage seem quite
complicated but after using the command a few times you will see the
advantages and time-savings.
Page 2
------------------------- METHOD --------------------------------------
Load the command with '(load "autocmnd")' and then run the command with
'AC'. Move the crosshairs slowly across the screen and, watching
the status line, you will notice the crosshairs "recognizing" whatever
entity it has just crossed over. You can then enter one of many commands
as described later - based on the entity under the crosshairs.
---------------------- STATUS LINE ------------------------------------
As soon as the crosshairs has "recognized" the entity it has just passed
over, the command will report all necessary information about this
entity on the status line. In draw/edit mode (explained later) you will
see, starting from the far left, i) the type of entity (line/ pline/
block/ circle/ etc.), ii) what layer the entity is on and iii) what
color the entity is. If the entity is a block - the name of the block
will be shown, as well as its scale and rotation angle. If the X, Y & Z
scales of the block are the same, just one scale factor is reported,
otherwise the separate and different X, Y & Z scale factors are reported
- thereby letting you know whether the block can be exploded. (ie. if X,
Y and Z are the same, AutoCommand will report "Blkname (1.0<90)" - showing
you that it just recognized a block by the name of "Blkname", that the
block's x, y & z scales are both one and that the angle of the block is
90 degrees, if they differ the following will be reported "Blkname
(1.0,2.0,3.0<90)"). In layer mode, you will just see the name of the
entity/block, the layer it is on and whether it's color is "BYLAYER".
In Text mode only text entities are reported. The status line shows 'TXT
- ' and then shows the width (W:) if it is other than 1, height (H:),
style (S:) and justification (J:). Where the coordinates usually show
you will see the first twenty letters of the text line that was
recognized.
----------------- THE FIVE PARTS TO AUTOCOMMAND -----------------------
a) Edit Commands
The following edit commands can be issued to AutoCommand
- Array, Break, Copy, Erase, oFfset, stretcH, Move, Mirror, Pedit,
Rotate, Scale, and eXplode. All of these commands can be applied to the
entity recognized by the crosshairs - plus will allow you to add any
other entities to the selection set before finally executing the
command (except, obviously, offset). ie. If you wanted to erase several
entities, you would move the crosshairs over one of the entities so that
the command recognizes it, press "E" for erase. The entity last
recognized by the command will be highlighted and the command will
prompt you to "select objects". After pressing enter, the selected
entities will be erased.
If you try to break an entity that cannot be broken, an error message
will show and you can continue with the command. If you try to explode
an entity that cannot be exploded or a block with differing x and y
values, you will get an error message and will be allowed to reselect.
If you try to pedit a non-polyline entity, you will be warned again.
If you press an invalid key, you will also be informed.
You can even undo previous commands from inside AutoCommand.
Page 3
b) Draw Commands
Nearly every draw command can be invoked by AutoCommand - if a similar
entity exists on the screen. For example, to draw a line, move the
crosshairs over a line so that it is recognized and is reported at the
status line. Press "N" for "New command" or "D" for "Draw" and bingo,
the line command is invoked. In addition to this, AutoCommand will allow
you to start the line at the closest endpoint to the line picked !!!
If the recognized entity is a block, pressing "I" will insert the same
block at the same scale - prompting for insertion point and rotation
angle. Forget about remembering the names of all blocks in the drawing -
USE AUTOCOMMAND!! If you press "N" after a block has been recognized,
you will be asked if you wish to insert the same block at the same scale
or whether you wish to stipulate the name of a new block.
If the recognized entity is a circle, you will be permitted to draw
another circle in with the same center point as the circle recognized or
a different circle elsewhere.
If text has been recognized, you will be asked if you wish to continue
the text command immediately after the recognized text line. If so, the
same style, height and rotation angle will be set and if the X-value is
other than 1, AutoCommand will report what the x-scale is and will change
it accordingly. You can of course start the text command from a
completely new place, with new style, height, etc. - it's up to you!
Of course, when using AutoCommand to draw new entities based on existing
ones, it will set the layer to that of the existing entity.
c) Layer Manipulation
By pressing "L" when in AutoCommand, you will be switched over to the
layer manipulation mode. In the status line, you will now see the
current layer and mode settings but where the coordinates should be,
you will see the type of entity and what layer it is on. If the entity's
color is not "BYLAYER" then an "*" will appear before the entity type.
The crosshairs will still report on whatever entity it has crossed over.
For explanation purposes, I will call the layer reported in the status
area, the "displayed layer". You can now use this info to i) make the
displayed layer current ii) switch the displayed layer off iii) freeze
the displayed layer iv) make the displayed layer current and switch all
others off or v) delete all entities on the displayed layer.
If you try to freeze or switch off the current layer, you will get an
error message and be allowed to continue.
You can of course return to the edit/draw mode of the command by
pressing "X".
d) Zoom
With Version 2 of AutoCommand, you can now ZOOM window, extents, limits
(all), previous, to the smallest or biggest screen without regenerating
and PAN normally or one screen left, right up or down.
Page 4
e) Text
With Version 3 of AutoCommand, I have introduced the Text manipulation
section. As mentioned previously, on the status line only text entities
are reported. You will be informed as to the text's width (if it is
other than 1), justification, height and style - preceded by the first
letter of what is being reported. You will also be shown the first
twenty letters of the text line. ie. A line of text ("This is text")
that is 6" high, style "txt", width 1.25 and center justified will be
shown as follows:-
TXT - W:1.25 J:C S:txt H:6 "This is text"
You will then be allowed to add text (Continue), continue text below the
recognized line with the same layer, style, height and justificiation
(Continue), edit the text using revision 11's dialogue box (edit),
change the height (height), justification (justification), style (style)
or width (x-Value) of any or all text in the drawing and you will be
able to replace every occurrance of a particular string with another
string (replace). After each one of these commands except the edit and
redraw commands, you will be returned to the main AutoCommand menu.
Redraw returns to the text menu and Edit returns to the AutoCad Command
prompt.
Also in Revision 3 are four help screens with explanations on what the
different key presses mean.
------------------------ RESTRICTIONS ----------------------------------
AutoCad will only allow a certain number of characters to be shown in
the status line. Therefore if you are using AEC or use blocks or layers
with long names, the entities reported on the status line may be
truncated. My layers and blocks are approx. 8 letters long each and the
command works fine.
If your drawing is large, the crosshairs may move a lot slower than
regularly as they are constantly checking for entities.
As colors past color 7 are not standard, AutoCommand will only report
the number. However, if you wish to change the number to a name (as I
have on my system) use a text editor or word processor in non-document
mode and change the following code:
((= h 8) (setq clr "8"))
((= h 9) (setq clr "9"))
((= h 10) (setq clr "10"))
((= h 11) (setq clr "11"))
((= h 12) (setq clr "12"))
((= h 13) (setq clr "13"))
((= h 14) (setq clr "14"))
((= h 15) (setq clr "15"))
To: /------------- put your names here
((= h 8) (setq clr "orange"))
((= h 9) (setq clr "lime"))
((= h 10) (setq clr "teal"))
((= h 11) (setq clr "lt.blue"))
((= h 12) (setq clr "purple"))
((= h 13) (setq clr "fuschia"))
((= h 14) (setq clr "dk.grey"))
((= h 15) (setq clr "lt.grey"))
or whatever your colors are but keep them short.
Page 5
---------------- BUGS/SUGGESTIONS/REGISTRATION/ETC. -------------------
I have checked the routine for bugs several times but am human -
if you find any, please let me know and I will try to fix 'em.
There also may be commands that I have forgotten to remove that are
specific to my machine/blocks/etc. If I have left any in, please forgive
me - I will repent...
I would really appreciate any comments or suggestions and if you use the
routine and you'd like to encourage me to continue trying (and would
like me to hurry with the next revision - see below), you may send $15.00
to my "reduce the credit card balance" fund at the address below.
I am in the process of adding an extra section to the routine. This will
add many block editting features such as
i) update every occurrance of a picked block to another picked
block
ii) replace selected blocks with a particluar block
iii) change the color of individual entities of a block (including nested) to "BYLAYER".
iv) explode selected blocks
v) explode blocks with differing x and y values
vi) highlight and count the occurances of a particular block
vii) explode a block to a user-specified layer
viii) scale selected blocks by a scale factor (using their ins.
point as the base point)
These features will be added if I receive enough registrations that it
warrants the time spent.
Because of the "slowness and jerk" of this routine in a large drawing, I
am debating with myself about changing the routine so that when an
entity is picked, the routine will offer the available commands to edit
or add entities. This will eliminate any slowness and jerk. This will,
however, involve a lot of code revision so if you want it, let me know
and if there is enough repsonse I will get to work...
Hope you like AutoCommand and that it gives you the competitive edge and
profit margin you deserve.
Eric Michalowsky
------------------------- CREDITS ---------------------------------------
Credit should be given where credit is due. I have used several routines
that I have "picked up" in the past and added/editted them. I have
unfortunately not kept track of who wrote what so, for all those
"unknown lisp programmers" that have given me guidance, thank you all.
The basic inspiration of using the crosshairs and the status line for
this purpose was found in a lisp routine in the October 1990 Cadence
magazine and I would like to thank Daniel M. Iaria for that routine and
the inspiration.
Page 6
-------------------- REVISION HISTORY ----------------------------------
-------------------- REVISION 2 CHANGES --------------------------------
i. Help screens now available
ii. Improved prompts for single monitor users
iii. Undo command
iv. Bug Fix with the (RTD) and (DTR) functions
v. Zoom Section
-------------------- REVISION 3 CHANGES --------------------------------
i. Redraw added where necessary
ii. Text manipulation section added:
a. add text
b. continue text with same parameters as picked
c. edit text
d. change style of selected strings
e. change jusitification of selected strings
f. change height of selected strings
g. change width (x-Value) of selected strings
h. replace every occurrance of a string of letters with a
different string
iii. Stretch added to main menu
iv. Offset added to main menu
v. Array added to main menu
Page 7
-------------------- CUSTOMIZATION ------------------------------------
As every drafter has their own unique way of doing things (especially in
AutoCad), the set-up and/or commands in AutoCommand may not be optimal.
I can, therefore, customize AutoCommand to suit the needs of most
tasks/draftsmen/designers. If you would like particular commands or
other lisp routines, such as dimensioning, to be added to AutoCommand I
can hopefully change the program to best suit your needs. However,
because it is a "one-of-a-kind" type thing I will have to charge for
registration as well as for the changes.
As the changes may be simple or extremely difficult, I will have to
"quote" on any such changes but as I learn while I add/change it
shouldn't be too expensive.
If you would like a cuustomized version of AutoCommand for your
office/needs, either send me a message, call me at the number in this
documentation or write to me at the address in this documantation and I
will get back to you as to the feasibility and charge.
Page 8
-------------------- THE USUAL WARRANTY & DISCLAIMER ------------------
This program/routine is provided AS IS. Eric Michalowsky MAKES NO
WARRANTY OF ANY KIND, EXPRESSED OR IMPLIED, INCLUDING WITHOUT
LIMITATION, ANY WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
PARTICULAR PURPOSE.
=================================
Registered Version ONLY Warranty:
=================================
Eric Michalowsky warrants the physical diskette(s) provided with
registered versions to be free of defects in materials and
workmanship for a period of sixty days from the date of
registration. If Eric Michalowsky receives notification within the
warranty period of defects in materials or workmanship, and such
notification is determined by Eric Michalowsky to be correct,Eric
Michalowsky will replace the defective diskette(s) or documentation.
The entire and exclusive liability and remedy for breach of this
Limited Warranty shall be limited to replacement of defective
diskette(s) and shall not include or extend to any claim for or
right to recover any other damages, including but not limited to,
loss of profit, data, or use of the software, or special,
incidental, or consequential damages or other similar claims, even
if Eric Michalowsky has been specifically advised of the possibility
of such damages. In no event will Eric Michalowsky's liability for
any damages to you or any other person ever exceed the lower of
suggested list price or actual price paid for the license to use the
software, regardless of any form of the claim.
Eric Michalowsky SPECIFICALLY DISCLAIMS ALL OTHER
WARRANTIES, EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED
TO, ANY IMPLIED WARRANTY OF MERCHANTABILITY AND/OR FITNESS
FOR A PARTICULAR PURPOSE.